function testfanxing(arg:any):any{
    return true;
}

//泛型约束和定义
function testfanxing2<T extends Fanxin>(arg:T):T{
    let a:T = arg;
    console.log(typeof(a))
    return a;
}
let tt = testfanxing2<Fanxin>({name:"str"})
console.log(tt)
class Fanxin{
    name:string
}
//泛型类
class DemoFanxing<T>{
    data:T;
}
new DemoFanxing<string>()